#include "exception-local.h"

exception_t exception_make(exception_type_t type, bstring param1)
{
    exception_t ex;

#ifdef DEBUG
    if (0!=param1 && type!=EXC_OK)
        fprintf (stderr,"\nThrowing: %d:%s at %s:%d\n",type,param1->data,__exc_file,__exc_line);
    else
        fprintf (stderr,"\nThrowing: %d at %s:%d\n",type,__exc_file,__exc_line);
#endif

    ex.type = type;
    ex.param1 = param1;
    return ex;
}

